package com.cedifie.lendapp.http

import com.cedifie.http.callback.StringCallback
import com.lib.base.utils.log.LogHelper
import org.json.JSONObject

/**
 * Cedifie
 * @Author wwdeng
 * @CreateTime: 2024/6/12 17:38
 * @Annotation：网络请求帮助类
 */
object HttpHelper : IHttpLoader {

    private var mHttpLoader: IHttpLoader? = null

    fun init(httpLoader: IHttpLoader) {
        mHttpLoader = httpLoader
    }

    override fun postCedAction(url: String, params: JSONObject, callback: IHttpCallback) {
        mHttpLoader?.postCedAction(url, params, callback);
    }

    override fun addCedEventAction(eventName: String, remark: String) {
        mHttpLoader?.addCedEventAction(eventName, remark)
    }

    override fun uploadCedFileAction(url: String, filePath: String, callback: StringCallback) {
        mHttpLoader?.uploadCedFileAction(url,filePath,callback)
    }
}
